package com.wwj.aiAnswer.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class R<T> {

    private int code;
    private String message;
    private T data;

    public static <T> R<T> ok(int code,String message, T data){
        return new R<>(code, message, data);
    }

    public static <T> R<T> error(int code,String message, T data) {
        return new R<>(code,message, data);
    }

}